package org.llc.gof.structure.proxy.dynamic.basic0;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author harvey
 */
public class MyInvocationHandler implements InvocationHandler {

	Object obj;
	
	public MyInvocationHandler(Object _obj){
		this.obj = _obj;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

		System.out.println("执行方法：" + method.getName());
		Object object = method.invoke(this.obj, args);
		return object;
	}
	
}
